package com.gadgets.cm01.role.controller;

import com.gadgets.cm01.role.dto.RoleOperDTO;
import com.gadgets.cm01.role.dto.RoleQueryDTO;
import com.gadgets.cm01.role.pojo.Role;
import com.gadgets.framework.common.dto.HttpBaseResp;
import com.gadgets.framework.common.dto.Pagination;
import com.gadgets.framework.common.exception.GadgetsServiceException;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2020-10-09
 * 
 */
public interface IRoleManagerController {

    /**
     * 新增角色信息
     * @param request                       请求信息
     * @param response                      应答信息
     * @param operDTO                       角色信息
     * @return                              操作结果
     * @throws GadgetsServiceException      异常信息
     */
    HttpBaseResp<Object> addRoleInfo(HttpServletRequest request, HttpServletResponse response, RoleOperDTO operDTO) throws GadgetsServiceException;

    /**
     * 更新角色信息
     * @param request                       请求信息
     * @param response                      应答信息
     * @param operDTO                       角色信息
     * @return                              操作结果
     * @throws GadgetsServiceException      异常信息
     */
    HttpBaseResp<Object> editRoleInfo(HttpServletRequest request, HttpServletResponse response, RoleOperDTO operDTO) throws GadgetsServiceException;

    /**
     * 删除已废弃角色信息
     * @param request                       请求信息
     * @param response                      应答信息
     * @param operDTO                       角色信息
     * @return                              操作结果
     * @throws GadgetsServiceException      异常信息
     */
    HttpBaseResp<Object> deleteRoleInfo(HttpServletRequest request, HttpServletResponse response, RoleOperDTO operDTO) throws GadgetsServiceException;

    /**
     * 分页条件查询角色信息
     * @param request                       请求信息
     * @param response                      应答信息
     * @param queryDTO                      查询条件
     * @param pagination                    分页条件
     * @return                              操作结果
     * @throws GadgetsServiceException      异常信息
     */
    HttpBaseResp<Role> queryRoleInfoByCondition(HttpServletRequest request, HttpServletResponse response, RoleQueryDTO queryDTO, Pagination pagination) throws GadgetsServiceException;

}
